package jym.tan.tmdb.bean.wrapper;

import java.io.Serializable;
import java.util.List;

import jym.tan.tmdb.bean.Base;
import jym.tan.tmdb.bean.PersonCast;
import jym.tan.tmdb.bean.PersonCrew;

import com.google.gson.annotations.SerializedName;

/**
 * The Class PersonCreditWrapper. The Wrapper class which holds the 
 * {@link List} of {@link PersonCast}, {@link PersonCrew} and other information.
 * <p>
 * 	The properties are:
 * 	<ul>
 * 		<li>id</li>
 * 		<li>cast</li>
 * 		<li>crew</li>
 * 	</ul>
 * </p>	 
 * @author Tanmoy 
 */
public class PersonCreditWrapper extends Base implements Serializable {

	private static final long serialVersionUID = -4131040407715500537L;

	@SerializedName("cast")
	private List<PersonCast> casts;
	
	@SerializedName("crew")
	private List<PersonCrew> crews;
	
	/**
	 * Default Constructor.
	 */
	public PersonCreditWrapper() {
	
	}

	/**
	 * Gets the {@link List} of {@link PersonCast}.
	 *
	 * @return 
	 * 		The casts
	 */
	public List<PersonCast> getCasts() {
		return casts;
	}

	/**
	 * Sets the {@link List} of {@link PersonCast}.
	 *
	 * @param casts 
	 * 		The new casts
	 */
	public void setCasts(List<PersonCast> casts) {
		this.casts = casts;
	}

	/**
	 * Gets the {@link List} of {@link PersonCrew}.
	 *
	 * @return 
	 * 		The crews
	 */
	public List<PersonCrew> getCrews() {
		return crews;
	}

	/**
	 * Sets the {@link List} of {@link PersonCrew}.
	 *
	 * @param crews 
	 * 		The new crews
	 */
	public void setCrews(List<PersonCrew> crews) {
		this.crews = crews;
	}
	
	/* (non-Javadoc)
	 * @see jym.tan.tmdb.bean.Base#toString()
	 */
	@Override
	public String toString() {		
		StringBuilder builder = new StringBuilder();
		builder.append("{").
			append("id:").append(id).
			append(",").
			append("cast:").append(casts).
			append(",").
			append("crew:").append(crews).					
			append("}");
		return builder.toString();
	}
}
